﻿FlyTalk.views.MainView = Ext.extend(Ext.Panel, {
    fullscreen: true,
    layout: 'card',
    cardSwitchAnimation: 'slide',
    initComponent: function () {

		Ext.apply(FlyTalk.views, {
			HomeView: new FlyTalk.views.HomeView(),          // home view
			TalkView: new FlyTalk.views.TalkView(),          // flight talk, mytalk, bored
			SearchView: new FlyTalk.views.SearchView(),      // search, ask, find
			ProfView: new FlyTalk.views.ProfView(),          // profile
			ItinMapView: new FlyTalk.views.ItinMapView(),    // itinerary + map
			ServicesView: new FlyTalk.views.ServicesView(),  // services
			SettingView: new FlyTalk.views.SettingView(),    // settings (currently, used to test other functionality)
			PostView: new FlyTalk.views.PostView(),          // sub: open thread page
			ComposeView: new FlyTalk.views.ComposeView(),    // sub: review form
			QuestionForm: new FlyTalk.views.QuestionForm(),  // sub: question form
			MapView: new FlyTalk.views.MapView(),            // sub: suggestion form
			BoredView: new FlyTalk.views.BoredView(),        // sub: menu overlay
			NotificationView: new FlyTalk.views.NotificationView(),  
			ModeSelection: new FlyTalk.views.ModeSelection(), 
			ItinDetailView: new FlyTalk.views.ItinDetailView(),
			RestaurantView: new FlyTalk.views.RestaurantView(),
			//MapTab: new FlyTalk.views.MapTab(),
			//HelpView: new FlyTalk.views.HelpView(), 
			//MyTalkView: new FlyTalk.views.MyTalkView(),
        });

        this.items = [
            FlyTalk.views.HomeView,       // home
			FlyTalk.views.TalkView,       // flight talk, mytalk, bored
			FlyTalk.views.SearchView,     // search, ask, find
			FlyTalk.views.ProfView,       // profile
			FlyTalk.views.ItinMapView,       // itinerary + map
			FlyTalk.views.ServicesView,   // services
			FlyTalk.views.SettingView,    // settings
			FlyTalk.views.PostView,       // sub: open thread page
			FlyTalk.views.ComposeView,    // sub: review form
			//FlyTalk.views.QuestionForm,   // sub: question form
			FlyTalk.views.MapView,        // sub: suggestion form
			FlyTalk.views.BoredView,      // sub: menu overlay
			FlyTalk.views.NotificationView,
			FlyTalk.views.ModeSelection,
			FlyTalk.views.ItinDetailView,
			FlyTalk.views.RestaurantView,
			//FlyTalk.views.MapTab,//Map
			//FlyTalk.views.HelpView, 
		//	FlyTalk.views.MyTalkView,
        ];
		
		this.timebar = new Ext.Panel({
			html: '<center><div style="padding-top: 5px;font-size: small">Process time: 38 min. TAP001 boards in 55 min.</div></center>',
			dock: 'bottom',
			height: 25,
			width: 320,
			//layout: 'hbox',
		});

        this.dockedItems = [this.timebar];

        FlyTalk.views.MainView.superclass.initComponent.call(this);

    },
});